﻿using Common.Communal;
using ERP.Domain.System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System.Services.Roles
{
    /// <summary>
    /// 角色服务接口
    /// </summary>
    public interface IRoleService
    {
        /// <summary>
        /// 新增角色
        /// </summary>
        /// <param name="role">角色实体</param>
        /// <returns>返回结果</returns>
        Task<ApiResult<int>> Add(Role role);
        /// <summary>
        /// 更新角色
        /// </summary>
        /// <param name="role">角色实体</param>
        /// <returns>返回结果</returns>
        Task<ApiResult<int>> Update(Role role);
        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="id">主键id</param>
        /// <returns>返回结果</returns>
        Task<ApiResult<int>> Delete(int id);
        /// <summary>
        /// 启用/禁用
        /// </summary>
        /// <param name="id">主键id</param>
        /// <returns>返回结果</returns>
        Task<ApiResult<int>> Enable(int id);
    }
}
